﻿
using OpenCvSharp;

using Xc.DataAccess.Core;

namespace Xc.DataAccess.CodeReader.Models
{
    public class CVSize : ViewModelBase
    {
        private int width;
        private int height;

        public int Width
        {
            get => width; set
            {
                width = value;
                RaisedPropertyChanged();
            }
        }
        public int Height
        {
            get => height; set
            {
                height = value;
                RaisedPropertyChanged();
            }
        }
        public static implicit operator Size(CVSize cVSize)
        {
            if (cVSize == null)
            {
                return new Size { Width=800,Height=600};
            }
            return new Size { Height = cVSize.Height, Width = cVSize.Width };
        }
    }
}
